package com.easylinkin.linkappapi.lobar.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.easylinkin.linkappapi.lobar.dto.CompanyTree;
import com.easylinkin.linkappapi.lobar.dto.GroupDTO;
import com.easylinkin.linkappapi.lobar.entity.Group;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import java.util.Objects;

import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 班组表 Mapper 接口
 * </p>
 *
 * @author kanyuanfeng
 * @since 2022-04-13laborCompanyProject/list
 */
public interface GroupMapper extends BaseMapper<Group> {

  IPage<GroupDTO> queryListByPage(Page page, @Param("group") GroupDTO group);

  List<GroupDTO> queryListByPage(@Param("group") GroupDTO group);

  /**
   * 组成一个树
   */
  List<CompanyTree> getTree(@Param("tenantId") String tenantId, @Param("groupName")String groupName);

  List<Group> selectGroupByMap(Map<String, Objects> mp);
}
